using System.ComponentModel;

namespace Front._1120;

public partial class Form2 : Form
{
    public Form2()
    {
        InitializeComponent();
    }

    private void openFileDialog1_FileOk(object sender, CancelEventArgs e)
    {

    }

    private void button1_Click(object sender, EventArgs e)
    {
        string path = openFileDialog1.FileName;
        string strFileName = Path.GetFileName(path);
        openFileDialog1 = new OpenFileDialog();
        if (openFileDialog1.ShowDialog() == DialogResult.OK)
        {
            string uuid= Guid.NewGuid().ToString();
            long time= DateTime.Now.Ticks;
            File.Copy(openFileDialog1.SafeFileName, "D:\\C#\\" + Path.GetFileName(openFileDialog1.FileName));
            this.pictureBox1.Image=Image.FromFile(openFileDialog1.FileName);
        }
    }

    private void botton2_Click(object sender, EventArgs e)
    {
        saveFileDialog1=new SaveFileDialog();
        if (saveFileDialog1.ShowDialog() == DialogResult.OK)
        {
            string str = "Hello World";
            File.WriteAllText(saveFileDialog1.FileName,str);
        }
    }

    private void pictureBox1_Click(object sender, EventArgs e)
    {
        throw new System.NotImplementedException();
    }

    private void button4_Click(object sender, EventArgs e)
    {
        throw new System.NotImplementedException();
    }
}